﻿<UserControl x:Class="WetHatLab.OneNote.TaggingKit.manage.RemovableTag"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:local="clr-namespace:WetHatLab.OneNote.TaggingKit.manage"
             xmlns:prop="clr-namespace:WetHatLab.OneNote.TaggingKit.Properties"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" DataContextChanged="OnDataContextChanged">
    <Menu BorderThickness="1"
          BorderBrush="LightBlue"
          Background="White"
          PreviewKeyDown="tagNameEditBox_PreviewKeyDown"
          ToolTip="{Binding Mode=OneTime, Source={x:Static prop:Resources.SuggestedTag_Menu_Tooltip}}">
        <MenuItem Name="actionMenu"
                  HorizontalAlignment="Center"
                  VerticalAlignment="Center"
                  Background="Transparent">
            <MenuItem.Resources>
                <Style TargetType="{x:Type MenuItem}">
                    <Setter Property="FontSize" Value="16" />
                    <Setter Property="BorderThickness" Value="1" />
                    <Setter Property="BorderBrush" Value="LightBlue" />
                    <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.MenuColorKey}}" />
                </Style>
            </MenuItem.Resources>
            <MenuItem.Header>
                <TextBlock FontSize="12"
                           Margin="-5,0,-6,2"
                           HorizontalAlignment="Center"
                           VerticalAlignment="Center">
                    <TextBox Name="tagNameEditBox"
                             Visibility="Collapsed"
                             Background="Yellow"
                             Text="{Binding LocalName}"
                             VerticalAlignment="Bottom"
                             BorderThickness="0"
                             Margin="0,0,0,-4"
                             PreviewKeyDown="tagNameEditBox_PreviewKeyDown" /><TextBlock Name="highlighedTag"
                                                                       Visibility="Visible"
                                                                       Foreground="DarkSlateBlue"
                                                                       FontWeight="Bold"
                                                                       Text="asd" /><Run Text="(" Foreground="{Binding UseCountColor,Mode=OneWay}" /><Run Text="{Binding UseCount, Mode=OneWay}" Foreground="{Binding UseCountColor,Mode=OneWay}" /><Run Text=")" Foreground="{Binding UseCountColor,Mode=OneWay}" />
                </TextBlock>
            </MenuItem.Header>
            <MenuItem Name="cancelAction"
                      Header="{Binding Mode=OneTime, Source={x:Static prop:Resources.TagManager_TagSuggestions_MenuItem_Cancel}}"
                      Tag="CancelAction"
                      Click="MenuItem_Click">
                <MenuItem.Icon>
                    <TextBlock  Text="✘"
                                    FontWeight="ExtraBold"
                                    Foreground="Red"
                                    FontSize="15"
                                    VerticalAlignment="Center"
                                    HorizontalAlignment="Center" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Name="confirmAction"
                      Header="{Binding Mode=OneTime, Source={x:Static prop:Resources.TagManager_TagSuggestions_MenuItem_Confirm}}"
                      Tag="ConfirmAction"
                      Click="MenuItem_Click">
                <MenuItem.Icon>
                    <TextBlock  Text="✔"
                                FontWeight="ExtraBold"
                                Foreground="SpringGreen"
                                FontSize="15"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Name="renameAction"
                      Header="{Binding Mode=OneTime, Source={x:Static prop:Resources.TagManager_TagSuggestions_MenuItem_Rename}}"
                      ToolTip="{Binding Mode=OneTime, Source={x:Static prop:Resources.TagManager_TagSuggestions_MenuItem_Rename_Tooltip}}"
                      Margin="0,5,0,5"
                      Tag="RenameTag"
                      Click="MenuItem_Click">
                <MenuItem.Icon>
                    <TextBlock  Text="✎"
                                    FontFamily="Segoe UI Symbol"
                                    FontWeight="ExtraBold"
                                    FontSize="14"
                                    Foreground="DodgerBlue"
                                    VerticalAlignment="Center"
                                    HorizontalAlignment="Center" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Name="deleteAction"
                      Header="{Binding Mode=OneTime, Source={x:Static prop:Resources.TagManager_TagSuggestions_MenuItem_Delete}}"
                      ToolTip="{Binding Mode=OneTime, Source={x:Static prop:Resources.TagManager_TagSuggestions_MenuItem_Delete_Tooltip}}"
                      Tag="DeleteTag"
                      Click="MenuItem_Click">
                <MenuItem.Icon>
                    <TextBlock  Text="✘"
                                    FontWeight="ExtraBold"
                                    Foreground="Red"
                                    FontSize="15"
                                    VerticalAlignment="Center"
                                    HorizontalAlignment="Center" />
                </MenuItem.Icon>
            </MenuItem>
        </MenuItem>
    </Menu>
</UserControl>